package cn.denny.designpattern.command;

import java.util.ArrayList;
import java.util.List;

public class Waiter {

	private List<Command> orders = new ArrayList<Command>();
	
	public void senderOrder(Command command){
		orders.add(command);
	}
	
	public void notifyCooker(){
		for(Command order:orders){
			order.execute();
		}
	}

}
